package com.hspedu.StringBuffer;

/**
 * @Author Stringzhua
 * @Date 2024/3/9 17:14
 * description:
 */
public class StringBuffer02 {
    public static void main(String[] args) {
        //演示构造器的使用
        //1.会创建容量大小为16的char[]数组,用于存放字符内容
        StringBuffer stringBuffer = new StringBuffer();
        //2.通过构造器指定char的大小
        StringBuffer stringBuffer1 = new StringBuffer(100);
        //3.通过给一个String 创建StringBuffer
        //char数组大小就是 str.length()+16
        StringBuffer hello = new StringBuffer("hello");
    }
}
